<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/24 0024
 * Time: 11:43
 */
$dom = new DOMDocument();
$dom->load('./test.xml');

$xpath = new DOMXPath($dom);

$nodes = $xpath->query("*[local-name()= 'body']", $dom->documentElement);
echo $nodes->item(0)->getAttributeNode('background')->value;